package cn.stylefeng.guns.czlm.service;

import cn.stylefeng.guns.czlm.entity.TbAttachment;
import cn.stylefeng.guns.czlm.mapper.Tb_attachmentMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("TbAttachmentService")
public class TbAttachmentService  {
    @Autowired
    private Tb_attachmentMapper tb_attachmentMapper;


    /**
     * 查询素材表
     * @return
     */
   public List<TbAttachment> SelectAllImg(){
        return   tb_attachmentMapper.SelectAllImg();
    }

    /**
     * 删除素材表
      * @param id
     * @return
     */
   public Integer delImg(Integer id){
        return tb_attachmentMapper.delImg(id);
    }

    /**
     * 新增素材表
     * @param tbAttachment
     * @return
     */
   public Integer saveImg(TbAttachment tbAttachment) {
       System.err.println(tbAttachment.toString());
        return tb_attachmentMapper.saveImg(tbAttachment);
    }
}
